<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <title>hh</title>


</head>
<script>
    // 生成从minNum到maxNum的随机数
    function randomNum(minNum, maxNum) {
        switch (arguments.length) {
            case 1:
                return parseInt(Math.random() * minNum + 1, 10);
            case 2:
                return parseInt(Math.random() * (maxNum - minNum + 1) + minNum, 10);
            default:
                return 0;
        }
    }

    function formatDate(date) {
        let y = date.getFullYear();
        let m = date.getMonth() + 1;
        m = m < 10 ? '0' + m : m;
        let d = date.getDate();
        d = d < 10 ? ('0' + d) : d;
        return y + '-' + m + '-' + d;
    }

    // console.log(/.*[\u4e00-\u9fa5]+.*$/.test("2020-6-16 上午7:40 PDT"))
    // console.log(/.*[\u4e00-\u9fa5]+.*$/.test("Jun 16, 2020 7:40 AM PDT"))
    // console.log(formatDate(new Date("Jun 16, 2020 7:40 AM PDT - Jun 16, 2020 1:40 PM PDT".split("-")[0])))
    // "2020-6-16 上午7:40 PDT - 2020-6-16 下午1:40 PDT"

    let strArray = "iSPECLE EU | United States".split(" | ");

    // for (let strIndex = 0; strIndex < strArray.length; strIndex++) {
    // strArray[strIndex] = (strArray[strIndex] + "").trim();
    // }

    console.log(strArray)

    // let strValue = "2020-6-16 上午7:40 PDT - 2020-6-16 下午1:40 PDT".split(" - ")
    // console.log(strValue)

</script>

<body>
    <!--  网页控件元素，类似按钮/图片/文章什么的都写在这里  -->
</body>

</html>